﻿
Partial Class Acticles
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
        divListArticle.InnerHtml = ""
        Dim listTinTuc As List(Of Dictionary(Of String, Object)) = TinhThanhServer.GetListTinDuLich(0)
        Dim strHTML As String = " <ul id='listArticlesUL' data-role='listview'>"
        For i As Integer = 0 To listTinTuc.Count - 1
            If Not Util.GetDictionaryValueByKey(listTinTuc(i), "PDesc").Equals("") Then
                Dim url As String = Util.GetConfigKey("RootURl") + Util.GetDictionaryValueByKey(listTinTuc(i), "PLink").ToString()
                strHTML &= " <li class='liArticleItem'><a href='" + url + "' "
                strHTML &= " Title = '" + Util.GetDictionaryValueByKey(listTinTuc(i), "PTitle") + "'> <span"
                strHTML &= " class='thumb'>"
                strHTML &= " <img title='" + Util.GetDictionaryValueByKey(listTinTuc(i), "PTitle") + "'"
                strHTML &= " src='" + Util.GetDictionaryValueByKey(listTinTuc(i), "PImg") + "' width='80px' height='80px' /></span> <span class='heading'>"
                strHTML &= Util.GetDictionaryValueByKey(listTinTuc(i), "PTitle") + "</span> <span class='desc'>"
                strHTML &= Util.GetDictionaryValueByKey(listTinTuc(i), "PDesc") + "...</span>"
                strHTML &= " </a></li>"
            End If
        Next
        strHTML = strHTML + " </ul>"
        divListArticle.InnerHtml = strHTML
    End Sub
End Class
